/*
 Navicat Premium Data Transfer

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 80018
 Source Host           : localhost:3306
 Source Schema         : shop

 Target Server Type    : MySQL
 Target Server Version : 80018
 File Encoding         : 65001

 Date: 07/04/2020 16:34:12
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for activity
-- ----------------------------
DROP TABLE IF EXISTS `activity`;
CREATE TABLE `activity` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `title` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `start_time` datetime(3) NOT NULL,
  `end_time` datetime(3) NOT NULL,
  `remark` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `entrance_img` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `internal_top_img` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `online` tinyint(3) unsigned DEFAULT '1',
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  `delete_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Records of activity
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for activity_category
-- ----------------------------
DROP TABLE IF EXISTS `activity_category`;
CREATE TABLE `activity_category` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `category_id` int(10) unsigned NOT NULL,
  `activity_id` int(11) NOT NULL,
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  `delete_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Records of activity_category
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for activity_coupon
-- ----------------------------
DROP TABLE IF EXISTS `activity_coupon`;
CREATE TABLE `activity_coupon` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `coupon_id` int(10) unsigned NOT NULL,
  `activity_id` int(11) unsigned NOT NULL,
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  `delete_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Records of activity_coupon
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for activity_product
-- ----------------------------
DROP TABLE IF EXISTS `activity_product`;
CREATE TABLE `activity_product` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `activity_id` int(10) unsigned NOT NULL,
  `product_id` int(10) unsigned NOT NULL,
  `participation` tinyint(3) unsigned DEFAULT '0',
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  `delete_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Records of activity_product
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for admin
-- ----------------------------
DROP TABLE IF EXISTS `admin`;
CREATE TABLE `admin` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `password` char(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `status` tinyint(2) unsigned DEFAULT '1' COMMENT '启用状态，1启用，0删除',
  `create_time` int(11) DEFAULT NULL COMMENT '注册时间',
  `update_time` int(11) DEFAULT NULL,
  `delete_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of admin
-- ----------------------------
BEGIN;
INSERT INTO `admin` VALUES (1, 'admin', '21232f297a57a5a743894a0e4a801fc3', 1, 1584241863, 1584241863, NULL);
COMMIT;

-- ----------------------------
-- Table structure for admin_role
-- ----------------------------
DROP TABLE IF EXISTS `admin_role`;
CREATE TABLE `admin_role` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `admin_id` int(11) DEFAULT NULL COMMENT '管理员表id',
  `role_id` int(11) DEFAULT NULL COMMENT '角色表id',
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  `delete_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='管理员和角色关系表';

-- ----------------------------
-- Records of admin_role
-- ----------------------------
BEGIN;
INSERT INTO `admin_role` VALUES (1, 1, 1, NULL, NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for banner
-- ----------------------------
DROP TABLE IF EXISTS `banner`;
CREATE TABLE `banner` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'Banner名称，通常作为标识',
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'Banner描述',
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `img` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '部分banner可能有标题图片',
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  `delete_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='banner管理表';

-- ----------------------------
-- Records of banner
-- ----------------------------
BEGIN;
INSERT INTO `banner` VALUES (1, '首页轮播图', '首页轮播图', '首页轮播', NULL, NULL, NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for banner_item
-- ----------------------------
DROP TABLE IF EXISTS `banner_item`;
CREATE TABLE `banner_item` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `img_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'image表id',
  `img` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `keyword` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `type` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '跳转类型，可能导向商品，可能导向专题，可能导向其他。0，无导向；1：导向商品;2:导向专题',
  `banner_id` int(10) unsigned NOT NULL COMMENT '外键，关联banner表',
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  `delete_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='banner子项表';

-- ----------------------------
-- Records of banner_item
-- ----------------------------
BEGIN;
INSERT INTO `banner_item` VALUES (1, '欧美高端女装', 1, '/20200322/559ea02c1881b82b4e14fd47d8b2f2c9.jpg', NULL, 1, 1, NULL, NULL, NULL);
INSERT INTO `banner_item` VALUES (2, '南非美钻', 2, '/20200322/46f42d0152acd037c731f9f547ff9b0f.jpg', NULL, 1, 1, NULL, NULL, NULL);
INSERT INTO `banner_item` VALUES (3, '时尚女鞋', 3, '/20200322/48c609bc8ea14be648b1154a2e387aeb.jpg', NULL, 1, 1, NULL, NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for brand
-- ----------------------------
DROP TABLE IF EXISTS `brand`;
CREATE TABLE `brand` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  `delete_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Records of brand
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for category
-- ----------------------------
DROP TABLE IF EXISTS `category`;
CREATE TABLE `category` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '分类名称',
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '描述',
  `parent_id` int(10) unsigned DEFAULT '0' COMMENT '父级分类id',
  `img` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `is_root` tinyint(3) unsigned NOT NULL DEFAULT '1',
  `index` int(10) unsigned DEFAULT NULL,
  `online` int(10) unsigned DEFAULT '1',
  `level` int(10) unsigned DEFAULT NULL,
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  `delete_time` int(11) DEFAULT NULL,
  `topic_img_id` int(11) DEFAULT NULL COMMENT '关联image表id，分类底部图片',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=80 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='商品类目';

-- ----------------------------
-- Records of category
-- ----------------------------
BEGIN;
INSERT INTO `category` VALUES (1, '手机数码', '手机数码', 0, NULL, 1, NULL, 1, NULL, NULL, NULL, NULL, 5);
INSERT INTO `category` VALUES (2, '家用电器', '家用电器', 0, NULL, 1, NULL, 1, NULL, NULL, NULL, NULL, 5);
INSERT INTO `category` VALUES (3, '电脑办公', '电脑办公', 0, NULL, 1, NULL, 1, NULL, NULL, NULL, NULL, 5);
INSERT INTO `category` VALUES (4, '汽车用品', '汽车用品', 0, NULL, 1, NULL, 1, NULL, NULL, NULL, NULL, 5);
INSERT INTO `category` VALUES (5, '男装', '男装', 0, NULL, 1, NULL, 1, NULL, NULL, NULL, NULL, 5);
INSERT INTO `category` VALUES (6, '女装', '女装', 0, NULL, 1, NULL, 1, NULL, NULL, NULL, NULL, 5);
INSERT INTO `category` VALUES (7, '钟表珠宝', '钟表珠宝', 0, NULL, 1, NULL, 1, NULL, NULL, NULL, NULL, 5);
INSERT INTO `category` VALUES (8, '内衣配饰', '内衣配饰', 0, NULL, 1, NULL, 1, NULL, NULL, NULL, NULL, 5);
INSERT INTO `category` VALUES (9, '箱包手袋', '箱包手袋', 0, NULL, 1, NULL, 1, NULL, NULL, NULL, NULL, 5);
INSERT INTO `category` VALUES (10, '小米', '小米', 1, '/20200322/0467101ba22a63d09b40e651f2c0c08b.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (11, '华为', '', 1, '/20200322/a432df90533044d689957a4b04f9b83b.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (12, 'iPhone', NULL, 1, '/20200322/31771edd8d66824953edef1be2c4db59.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (13, 'vivo', NULL, 1, '/20200322/565783d3169cd671d72d2be893bf57e1.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (14, 'OPPO', NULL, 1, '/20200322/1e7265c9a0ee6e96c3e5897791279eb9.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (15, '魅族', NULL, 1, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (16, '三星', NULL, 1, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (17, '女性手机', NULL, 1, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (18, '电水壶', NULL, 2, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (19, '电压力锅', NULL, 2, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (20, '电饭煲', NULL, 2, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (21, '电磁炉', NULL, 2, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (22, '微波炉', NULL, 2, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (23, '电饼铛', NULL, 2, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (24, '豆浆机', NULL, 2, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (25, '多用途锅', NULL, 2, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (26, '轻薄本', NULL, 3, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (27, '游戏本', NULL, 3, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (28, '机械键盘', NULL, 3, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (29, '组装电脑', NULL, 3, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (30, '移动硬盘', NULL, 3, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (31, '显卡', NULL, 3, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (32, '游戏台式机', NULL, 3, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (33, '家用打印机', NULL, 3, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (34, '吃鸡装备', NULL, 3, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (35, '机油', NULL, 4, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (36, '汽车坐垫', NULL, 4, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (37, '洗车水枪', NULL, 4, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (38, '行车记录仪', NULL, 4, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (39, '轮胎', NULL, 4, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (40, '应急救援', NULL, 4, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (41, '行车香水', NULL, 4, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (42, '功能小件', NULL, 4, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (43, '挂件', NULL, 4, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (44, '夹克', NULL, 5, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (45, 'T恤', NULL, 5, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (46, '针织衫', NULL, 5, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (47, '衬衫', NULL, 5, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (48, '卫衣', NULL, 5, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (49, '风衣', NULL, 5, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (50, '牛仔裤', NULL, 5, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (51, '休闲裤', NULL, 5, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (52, '自营男装', NULL, 5, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (53, '早春新品', NULL, 6, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (54, '连衣裙', NULL, 6, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (55, '衬衫', NULL, 6, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (56, 'T恤', NULL, 6, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (57, '牛仔裤', NULL, 6, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (58, '卫衣', NULL, 6, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (59, '针织衫', NULL, 6, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (60, '牛仔外套', NULL, 6, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (61, '自营女装', NULL, 6, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (62, '瑞表', NULL, 7, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (63, '国表', NULL, 7, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (64, '德表', NULL, 7, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (65, '日韩表', NULL, 7, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (66, '儿童手表', NULL, 7, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (67, '欧美表', NULL, 7, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (68, '内衣馆', NULL, 8, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (69, '大牌文胸', NULL, 8, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (70, '自营内衣', NULL, 8, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (71, '内衣爆款', NULL, 8, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (72, '女士围巾/披肩', NULL, 8, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (73, '配饰馆', NULL, 8, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (74, '拉杆箱', NULL, 9, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (75, '时尚男包', NULL, 9, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (76, '男士腰带', NULL, 9, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (77, '男包上新', NULL, 9, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (78, '自营女包', NULL, 9, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `category` VALUES (79, '新款双肩包', NULL, 9, '/20200322/a849639fe41176f2a5eabe97b610d046.jpg', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for coupon
-- ----------------------------
DROP TABLE IF EXISTS `coupon`;
CREATE TABLE `coupon` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `full_money` decimal(10,2) DEFAULT NULL,
  `minus` decimal(10,2) DEFAULT NULL,
  `rate` decimal(10,2) DEFAULT NULL COMMENT '国内多是打折，国外多是百分比 off',
  `type` smallint(6) NOT NULL COMMENT '1. 满减券 2.折扣券 3.无门槛券 4.满金额折扣券',
  `valitiy` int(10) unsigned DEFAULT NULL,
  `activity_id` int(10) unsigned DEFAULT NULL,
  `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `whole_store` tinyint(3) unsigned DEFAULT '0',
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  `delete_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Records of coupon
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for coupon_category
-- ----------------------------
DROP TABLE IF EXISTS `coupon_category`;
CREATE TABLE `coupon_category` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `category_id` int(10) unsigned NOT NULL,
  `coupon_id` int(11) unsigned NOT NULL,
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  `delete_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Records of coupon_category
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for coupon_template
-- ----------------------------
DROP TABLE IF EXISTS `coupon_template`;
CREATE TABLE `coupon_template` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `full_money` decimal(10,2) DEFAULT NULL,
  `minus` decimal(10,2) DEFAULT NULL,
  `discount` decimal(10,2) DEFAULT NULL COMMENT '国内多是打折，国外多是百分比 off',
  `type` smallint(6) NOT NULL COMMENT '1. 满减券 2.折扣券 3.无门槛券 4.满金额折扣券',
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  `delete_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Records of coupon_template
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for coupon_type
-- ----------------------------
DROP TABLE IF EXISTS `coupon_type`;
CREATE TABLE `coupon_type` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `code` int(11) NOT NULL,
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  `delete_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Records of coupon_type
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for grid_category
-- ----------------------------
DROP TABLE IF EXISTS `grid_category`;
CREATE TABLE `grid_category` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `img` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `category_id` int(11) DEFAULT NULL,
  `root_category_id` int(11) DEFAULT NULL,
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  `delete_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Records of grid_category
-- ----------------------------
BEGIN;
INSERT INTO `grid_category` VALUES (1, '服装', NULL, NULL, NULL, 2, 1584241863, 1584241863, NULL);
INSERT INTO `grid_category` VALUES (2, '包包', NULL, NULL, NULL, 3, 1584241863, 1584241863, NULL);
INSERT INTO `grid_category` VALUES (3, '鞋', NULL, NULL, NULL, 1, 1584241863, 1584241863, NULL);
INSERT INTO `grid_category` VALUES (4, '饰品', NULL, NULL, NULL, 5, 1584241863, 1584241863, NULL);
INSERT INTO `grid_category` VALUES (5, '居家', NULL, NULL, NULL, 4, 1584241863, 1584241863, NULL);
INSERT INTO `grid_category` VALUES (6, '工艺', NULL, NULL, NULL, 24, 1584241863, 1584241863, NULL);
COMMIT;

-- ----------------------------
-- Table structure for image
-- ----------------------------
DROP TABLE IF EXISTS `image`;
CREATE TABLE `image` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `url` varchar(255) NOT NULL COMMENT '图片路径',
  `from` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1 来自本地，2 来自公网',
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  `delete_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='图片总表';

-- ----------------------------
-- Records of image
-- ----------------------------
BEGIN;
INSERT INTO `image` VALUES (1, '/20200322/559ea02c1881b82b4e14fd47d8b2f2c9.jpg', 1, NULL, NULL, NULL);
INSERT INTO `image` VALUES (2, '/20200322/46f42d0152acd037c731f9f547ff9b0f.jpg', 1, NULL, NULL, NULL);
INSERT INTO `image` VALUES (3, '/20200322/48c609bc8ea14be648b1154a2e387aeb.jpg', 1, NULL, NULL, NULL);
INSERT INTO `image` VALUES (4, '/20200325/d17c5a8794e6896e9c0cc407bbc04714.jpg', 1, NULL, NULL, NULL);
INSERT INTO `image` VALUES (5, '/20200327/913310e8fabe8ad6f2419a0433f403ba.jpg', 1, NULL, NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for order
-- ----------------------------
DROP TABLE IF EXISTS `order`;
CREATE TABLE `order` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `order_no` varchar(20) DEFAULT NULL COMMENT '订单号',
  `user_id` int(11) unsigned DEFAULT NULL COMMENT 'user表外键，用户id，注意并不是openid',
  `total_price` decimal(10,2) DEFAULT '0.00',
  `status` tinyint(4) unsigned DEFAULT '1' COMMENT '1:未支付， 2：已支付，3：已发货 , 4: 已支付，但库存不足',
  `snap_img` varchar(255) DEFAULT NULL COMMENT '订单快照图片',
  `snap_name` varchar(80) DEFAULT NULL COMMENT '订单快照名称',
  `snap_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `total_count` int(11) unsigned DEFAULT '0',
  `snap_items` json DEFAULT NULL COMMENT '订单其他信息快照（json)',
  `snap_address` json DEFAULT NULL COMMENT '地址快照',
  `prepay_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '订单微信支付的预订单id（用于发送模板消息）',
  `final_total_price` decimal(10,2) DEFAULT NULL,
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  `delete_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uni_order_no` (`order_no`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of order
-- ----------------------------
BEGIN;
INSERT INTO `order` VALUES (1, 'D405542696505447', 1, 0.01, 1, 'http://wx-mini-shop.dev.com/uploads/20200331/a646e4dcfa138d91228be9f403b9be7d.jpg', '荣耀20青春版 AMOLED屏幕指纹 等', NULL, 5, '[{\"id\": 12, \"flag\": -1, \"count\": 3, \"title\": \"荣耀20青春版 AMOLED屏幕指纹 \", \"has_stock\": true, \"total_price\": 0.36}, {\"id\": 2, \"flag\": 1, \"count\": 2, \"title\": \"iPhoneX-2\", \"has_stock\": true, \"total_price\": 22}]', '{\"id\": 1, \"city\": \"烟台市\", \"name\": \"邹晓杰\", \"detail\": \"古柳镇赭埠村382号\", \"mobile\": \"18511013819\", \"country\": \"莱阳县\", \"user_id\": 1, \"province\": \"山东省\"}', NULL, NULL, 1586054269, 1586054269, NULL);
INSERT INTO `order` VALUES (2, 'D405544567319229', 1, 0.01, 1, 'http://wx-mini-shop.dev.com/uploads/20200331/a646e4dcfa138d91228be9f403b9be7d.jpg', '荣耀20青春版 AMOLED屏幕指纹 等', NULL, 5, '[{\"id\": 12, \"flag\": -1, \"count\": 3, \"title\": \"荣耀20青春版 AMOLED屏幕指纹 \", \"has_stock\": true, \"total_price\": 0.36}, {\"id\": 2, \"flag\": 1, \"count\": 2, \"title\": \"iPhoneX-2\", \"has_stock\": true, \"total_price\": 22}]', '{\"id\": 2, \"city\": \"烟台市\", \"name\": \"张大川\", \"detail\": \"城厢街道13号\", \"mobile\": \"13120060568\", \"country\": \"莱阳县\", \"user_id\": 1, \"province\": \"海南省\"}', NULL, NULL, 1586054456, 1586054456, NULL);
INSERT INTO `order` VALUES (3, 'D405555754469569', 1, 0.02, 1, 'http://wx-mini-shop.dev.com/uploads/20200331/a646e4dcfa138d91228be9f403b9be7d.jpg', '荣耀20青春版 AMOLED屏幕指纹 等', NULL, 5, '[{\"id\": 12, \"flag\": -1, \"count\": 3, \"title\": \"荣耀20青春版 AMOLED屏幕指纹 \", \"has_stock\": true, \"total_price\": 0.36}, {\"id\": 2, \"flag\": 1, \"count\": 2, \"title\": \"iPhoneX-2\", \"has_stock\": true, \"total_price\": 22}]', '{\"id\": 2, \"city\": \"烟台市\", \"name\": \"张大川\", \"detail\": \"城厢街道13号\", \"mobile\": \"13120060568\", \"country\": \"莱阳县\", \"user_id\": 1, \"province\": \"海南省\"}', NULL, NULL, 1586055575, 1586055575, NULL);
INSERT INTO `order` VALUES (4, 'D405556738913447abc', 1, 0.02, 1, 'http://wx-mini-shop.dev.com/uploads/20200331/a646e4dcfa138d91228be9f403b9be7d.jpg', '荣耀20青春版 AMOLED屏幕指纹 等', NULL, 5, '[{\"id\": 12, \"flag\": -1, \"count\": 3, \"title\": \"荣耀20青春版 AMOLED屏幕指纹 \", \"has_stock\": true, \"total_price\": 0.36}, {\"id\": 2, \"flag\": 1, \"count\": 2, \"title\": \"iPhoneX-2\", \"has_stock\": true, \"total_price\": 22}]', '{\"id\": 2, \"city\": \"烟台市\", \"name\": \"张大川\", \"detail\": \"城厢街道13号\", \"mobile\": \"13120060568\", \"country\": \"莱阳县\", \"user_id\": 1, \"province\": \"海南省\"}', 'wx05121056648453eb164942881438966400', NULL, 1586055673, 1586059853, NULL);
INSERT INTO `order` VALUES (5, 'D405560273242812', 1, 0.01, 1, 'http://wx-mini-shop.dev.com/uploads/20200331/a646e4dcfa138d91228be9f403b9be7d.jpg', '荣耀20青春版 AMOLED屏幕指纹 等', NULL, 5, '[{\"id\": 12, \"flag\": -1, \"count\": 3, \"title\": \"荣耀20青春版 AMOLED屏幕指纹 \", \"has_stock\": true, \"total_price\": 0.36}, {\"id\": 2, \"flag\": 1, \"count\": 2, \"title\": \"iPhoneX-2\", \"has_stock\": true, \"total_price\": 22}]', '{\"id\": 2, \"city\": \"烟台市\", \"name\": \"张大川\", \"detail\": \"城厢街道13号\", \"mobile\": \"13120060568\", \"country\": \"莱阳县\", \"user_id\": 1, \"province\": \"海南省\"}', 'wx05122915594919c0793aad081284004600', NULL, 1586056027, 1586060952, NULL);
COMMIT;

-- ----------------------------
-- Table structure for order_product
-- ----------------------------
DROP TABLE IF EXISTS `order_product`;
CREATE TABLE `order_product` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `order_id` int(11) DEFAULT NULL COMMENT '订单id',
  `flag` tinyint(2) NOT NULL DEFAULT '-1' COMMENT '-1:单规格，1:多规格',
  `item_id` int(11) DEFAULT NULL COMMENT '记录spuid或者skuid',
  `count` int(11) unsigned NOT NULL COMMENT '每个商品数量',
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  `delete_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Records of order_product
-- ----------------------------
BEGIN;
INSERT INTO `order_product` VALUES (1, 1, -1, 12, 3, 1586054269, 1586054269, NULL);
INSERT INTO `order_product` VALUES (2, 1, 1, 2, 2, 1586054269, 1586054269, NULL);
INSERT INTO `order_product` VALUES (3, 2, -1, 12, 3, 1586054456, 1586054456, NULL);
INSERT INTO `order_product` VALUES (4, 2, 1, 2, 2, 1586054456, 1586054456, NULL);
INSERT INTO `order_product` VALUES (5, 3, -1, 12, 3, 1586055575, 1586055575, NULL);
INSERT INTO `order_product` VALUES (6, 3, 1, 2, 2, 1586055575, 1586055575, NULL);
INSERT INTO `order_product` VALUES (7, 4, -1, 12, 3, 1586055673, 1586055673, NULL);
INSERT INTO `order_product` VALUES (8, 4, 1, 2, 2, 1586055673, 1586055673, NULL);
INSERT INTO `order_product` VALUES (9, 5, -1, 12, 3, 1586056027, 1586056027, NULL);
INSERT INTO `order_product` VALUES (10, 5, 1, 2, 2, 1586056027, 1586056027, NULL);
COMMIT;

-- ----------------------------
-- Table structure for permission
-- ----------------------------
DROP TABLE IF EXISTS `permission`;
CREATE TABLE `permission` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '权限名字',
  `pid` smallint(5) unsigned DEFAULT NULL,
  `controller` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '控制器名',
  `action` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '方法名',
  `is_menu` tinyint(1) DEFAULT NULL COMMENT '是否是菜单',
  `sort` tinyint(1) DEFAULT '1',
  `pid_path` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  `delete_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='权限表';

-- ----------------------------
-- Records of permission
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for product
-- ----------------------------
DROP TABLE IF EXISTS `product`;
CREATE TABLE `product` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '商品名称',
  `subtitle` varchar(800) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `category_id` int(10) unsigned NOT NULL,
  `root_category_id` int(11) DEFAULT NULL,
  `online` tinyint(3) unsigned NOT NULL DEFAULT '1',
  `flag` int(1) DEFAULT '-1' COMMENT '默认是-1单规格,1是多规格',
  `price` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '文本型价格，有时候SPU需要展示的是一个范围，或者自定义平均价格',
  `stock` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '单规格库存量',
  `sketch_spec_id` int(10) unsigned DEFAULT NULL COMMENT '某种规格可以直接附加单品图片',
  `default_sku_id` int(11) DEFAULT NULL COMMENT '默认选中的sku',
  `img` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `discount_price` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `tags` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `is_test` tinyint(3) unsigned DEFAULT '0',
  `product_theme_img` json DEFAULT NULL,
  `for_theme_img` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `create_time` int(11) DEFAULT NULL COMMENT '创建时间',
  `update_time` int(11) DEFAULT NULL,
  `delete_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Records of product
-- ----------------------------
BEGIN;
INSERT INTO `product` VALUES (1, 'iPhoneX', NULL, 12, 1, 1, 1, '0.01', 10, NULL, 1, '/20200331/a646e4dcfa138d91228be9f403b9be7d.jpg', NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `product` VALUES (2, '苏泊尔（SUPOR）电水壶热水壶', NULL, 18, 2, 1, -1, '0.01', 900, NULL, NULL, '/20200331/a646e4dcfa138d91228be9f403b9be7d.jpg', NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `product` VALUES (3, '九阳热水壶', NULL, 18, 2, 1, -1, '0.01', 900, NULL, NULL, '/20200331/a646e4dcfa138d91228be9f403b9be7d.jpg', NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `product` VALUES (4, '美的电水壶1.7L', NULL, 18, 2, 1, -1, '0.01', 900, NULL, NULL, '/20200331/a646e4dcfa138d91228be9f403b9be7d.jpg', NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `product` VALUES (5, '米家电水壶小米电水壶304不锈钢', NULL, 18, 2, 1, -1, '0.01', 900, NULL, NULL, '/20200331/a646e4dcfa138d91228be9f403b9be7d.jpg', NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `product` VALUES (6, '志高电水壶1.8L', NULL, 18, 2, 1, -1, '0.01', 900, NULL, NULL, '/20200331/a646e4dcfa138d91228be9f403b9be7d.jpg', NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `product` VALUES (7, '半球电水壶自动断电', NULL, 18, 2, 1, -1, '0.01', 900, NULL, NULL, '/20200331/a646e4dcfa138d91228be9f403b9be7d.jpg', NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `product` VALUES (8, '小熊电水壶1.7L', NULL, 18, 2, 1, -1, '0.01', 900, NULL, NULL, '/20200331/a646e4dcfa138d91228be9f403b9be7d.jpg', NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `product` VALUES (9, '立客LK-S2011电水壶2.0L', NULL, 18, 2, 1, -1, '0.01', 900, NULL, NULL, '/20200331/a646e4dcfa138d91228be9f403b9be7d.jpg', NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `product` VALUES (10, '美菱电热水壶1.8L', NULL, 18, 2, 1, -1, '0.01', 900, NULL, NULL, '/20200331/a646e4dcfa138d91228be9f403b9be7d.jpg', NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `product` VALUES (11, '爱仕达电水壶5L大容量', NULL, 18, 2, 1, -1, '0.01', 900, NULL, NULL, '/20200331/a646e4dcfa138d91228be9f403b9be7d.jpg', NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `product` VALUES (12, '荣耀20青春版 AMOLED屏幕指纹 ', NULL, 11, 1, 1, -1, '0.01', 4, NULL, NULL, '/20200331/a646e4dcfa138d91228be9f403b9be7d.jpg', NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `product` VALUES (13, '荣耀9X 麒麟810', NULL, 11, 1, 1, -1, '0.01', 900, NULL, NULL, '/20200331/a646e4dcfa138d91228be9f403b9be7d.jpg', NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `product` VALUES (14, 'vivo iQOO 3 高通骁龙865', NULL, 13, 1, 1, -1, '0.01', 900, NULL, NULL, '/20200331/a646e4dcfa138d91228be9f403b9be7d.jpg', NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `product` VALUES (15, 'umbra花盆创意', NULL, 9, 0, 1, -1, '0.01', 900, NULL, NULL, '/20200331/a646e4dcfa138d91228be9f403b9be7d.jpg', NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for product_detail_img
-- ----------------------------
DROP TABLE IF EXISTS `product_detail_img`;
CREATE TABLE `product_detail_img` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `img` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `product_id` int(10) unsigned DEFAULT NULL,
  `index` int(10) unsigned NOT NULL,
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  `delete_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Records of product_detail_img
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for product_image
-- ----------------------------
DROP TABLE IF EXISTS `product_image`;
CREATE TABLE `product_image` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `img` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `product_id` int(10) unsigned DEFAULT NULL,
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  `delete_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Records of product_image
-- ----------------------------
BEGIN;
INSERT INTO `product_image` VALUES (1, '/20200323/d379e70e63f8fd72e74ba1a5f58947e2.png', 1, NULL, NULL, NULL);
INSERT INTO `product_image` VALUES (2, '/20200323/ce6a7e9084c35ae400dae6f5e08e46d5.jpg', 1, NULL, NULL, NULL);
INSERT INTO `product_image` VALUES (3, '/20200323/e78f350c2ccd77801badaa8ee766a475.jpg', 1, NULL, NULL, NULL);
INSERT INTO `product_image` VALUES (4, '/20200323/6b5cde2b468608d4aa7aea582185d06e.jpg', 1, NULL, NULL, NULL);
INSERT INTO `product_image` VALUES (5, '/20200323/3ea3c1840ffadb1b708eaf050d058711.jpg', 5, NULL, NULL, NULL);
INSERT INTO `product_image` VALUES (6, '/20200323/48ef7cefb9f93c01b6037003bdf7c71e.jpg', 5, NULL, NULL, NULL);
INSERT INTO `product_image` VALUES (7, '/20200325/d17c5a8794e6896e9c0cc407bbc04714.jpg', 15, NULL, NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for product_property
-- ----------------------------
DROP TABLE IF EXISTS `product_property`;
CREATE TABLE `product_property` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(30) DEFAULT '' COMMENT '详情属性名称',
  `detail` varchar(255) NOT NULL COMMENT '详情属性',
  `product_id` int(11) NOT NULL COMMENT '商品id，外键',
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  `delete_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of product_property
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for product_spec_key
-- ----------------------------
DROP TABLE IF EXISTS `product_spec_key`;
CREATE TABLE `product_spec_key` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `product_id` int(10) unsigned NOT NULL,
  `spec_key_id` int(10) unsigned NOT NULL,
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  `delete_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Records of product_spec_key
-- ----------------------------
BEGIN;
INSERT INTO `product_spec_key` VALUES (1, 1, 1, NULL, NULL, NULL);
INSERT INTO `product_spec_key` VALUES (2, 1, 2, NULL, NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for product_tag
-- ----------------------------
DROP TABLE IF EXISTS `product_tag`;
CREATE TABLE `product_tag` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `product_id` int(10) unsigned NOT NULL,
  `tag_id` int(10) unsigned NOT NULL,
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  `delete_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Records of product_tag
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for role
-- ----------------------------
DROP TABLE IF EXISTS `role`;
CREATE TABLE `role` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `status` tinyint(1) DEFAULT NULL COMMENT '角色的启用状态,0不启用,1启用',
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  `delete_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='角色表';

-- ----------------------------
-- Records of role
-- ----------------------------
BEGIN;
INSERT INTO `role` VALUES (1, '超级管理员', 1, NULL, NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for role_permission
-- ----------------------------
DROP TABLE IF EXISTS `role_permission`;
CREATE TABLE `role_permission` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `role_id` int(11) DEFAULT NULL COMMENT '角色表id',
  `permission_id` int(11) DEFAULT NULL COMMENT '权限表id',
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  `delete_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='角色和权限关系表';

-- ----------------------------
-- Records of role_permission
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sale_explain
-- ----------------------------
DROP TABLE IF EXISTS `sale_explain`;
CREATE TABLE `sale_explain` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `fixed` tinyint(3) unsigned DEFAULT '0',
  `text` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `product_id` int(11) DEFAULT NULL,
  `index` int(10) unsigned DEFAULT NULL,
  `replace_id` int(10) unsigned DEFAULT NULL,
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  `delete_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Records of sale_explain
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sku
-- ----------------------------
DROP TABLE IF EXISTS `sku`;
CREATE TABLE `sku` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `price` decimal(10,2) unsigned NOT NULL COMMENT '单品价格',
  `discount_price` decimal(10,2) unsigned DEFAULT NULL COMMENT '单品折扣价格',
  `online` tinyint(3) unsigned NOT NULL DEFAULT '1',
  `img` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `product_id` int(10) unsigned NOT NULL COMMENT '商品表id',
  `specs` json DEFAULT NULL COMMENT '规格标示,取自sku_specs表',
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'sku唯一标示码',
  `stock` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '库存量',
  `category_id` int(10) unsigned DEFAULT NULL,
  `root_category_id` int(10) unsigned DEFAULT NULL,
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  `delete_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='sku表(单品表)';

-- ----------------------------
-- Records of sku
-- ----------------------------
BEGIN;
INSERT INTO `sku` VALUES (1, 0.01, 5999.00, 1, '/20200323/20a14ec00d5b830264760bdf6085ab90.png', 'iPhoneX', 1, NULL, '1$1-1#2-3', 10, 12, 1, NULL, NULL, NULL);
INSERT INTO `sku` VALUES (2, 0.01, 1.00, 1, '/20200323/20a14ec00d5b830264760bdf6085ab90.png', 'iPhoneX-2', 1, NULL, '1$1-2#2-4', 2, 12, 1, NULL, NULL, NULL);
INSERT INTO `sku` VALUES (3, 0.01, 6999.00, 1, '/20200323/20a14ec00d5b830264760bdf6085ab90.png', 'iPhoneX', 1, NULL, '1$1-2#2-3', 20, 12, 1, NULL, NULL, NULL);
INSERT INTO `sku` VALUES (4, 0.01, 6888.00, 1, '/20200323/20a14ec00d5b830264760bdf6085ab90.png', 'iPhoneX', 1, NULL, '1$1-1#2-4', 13, 12, 1, NULL, NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for sku_specs
-- ----------------------------
DROP TABLE IF EXISTS `sku_specs`;
CREATE TABLE `sku_specs` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `product_id` int(11) unsigned NOT NULL COMMENT '商品id',
  `sku_id` int(11) unsigned NOT NULL COMMENT 'sku_id(单品id)',
  `spec_key_id` int(11) unsigned NOT NULL COMMENT '规格id',
  `spec_value_id` int(11) unsigned NOT NULL COMMENT '规格值id',
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  `delete_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='sku值表';

-- ----------------------------
-- Records of sku_specs
-- ----------------------------
BEGIN;
INSERT INTO `sku_specs` VALUES (1, 1, 1, 1, 1, NULL, NULL, NULL);
INSERT INTO `sku_specs` VALUES (2, 1, 1, 2, 3, NULL, NULL, NULL);
INSERT INTO `sku_specs` VALUES (3, 1, 2, 1, 2, NULL, NULL, NULL);
INSERT INTO `sku_specs` VALUES (4, 1, 2, 2, 4, NULL, NULL, NULL);
INSERT INTO `sku_specs` VALUES (5, 1, 3, 1, 2, NULL, NULL, NULL);
INSERT INTO `sku_specs` VALUES (6, 1, 3, 2, 3, NULL, NULL, NULL);
INSERT INTO `sku_specs` VALUES (7, 1, 4, 1, 1, NULL, NULL, NULL);
INSERT INTO `sku_specs` VALUES (8, 1, 4, 2, 4, NULL, NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for spec_key
-- ----------------------------
DROP TABLE IF EXISTS `spec_key`;
CREATE TABLE `spec_key` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '规格名字',
  `unit` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `standard` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `category_id` int(11) NOT NULL COMMENT '商品分类表id',
  `is_sale_attr` tinyint(4) DEFAULT '1' COMMENT '是否销售属性',
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  `delete_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='规格表';

-- ----------------------------
-- Records of spec_key
-- ----------------------------
BEGIN;
INSERT INTO `spec_key` VALUES (1, '颜色', NULL, 0, NULL, 1, 1, NULL, NULL, NULL);
INSERT INTO `spec_key` VALUES (2, '容量', NULL, 0, NULL, 1, 1, NULL, NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for spec_value
-- ----------------------------
DROP TABLE IF EXISTS `spec_value`;
CREATE TABLE `spec_value` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '规格值',
  `spec_key_id` int(11) unsigned NOT NULL COMMENT '规格表id',
  `extend` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  `delete_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='规格值表';

-- ----------------------------
-- Records of spec_value
-- ----------------------------
BEGIN;
INSERT INTO `spec_value` VALUES (1, '银色', 1, NULL, NULL, NULL, NULL);
INSERT INTO `spec_value` VALUES (2, '深空灰色', 1, NULL, NULL, NULL, NULL);
INSERT INTO `spec_value` VALUES (3, '全网通64GB', 2, NULL, NULL, NULL, NULL);
INSERT INTO `spec_value` VALUES (4, '全网通256GB', 2, NULL, NULL, NULL, NULL);
INSERT INTO `spec_value` VALUES (5, '魅海蓝', 1, NULL, NULL, NULL, NULL);
INSERT INTO `spec_value` VALUES (6, '幻夜黑', 1, NULL, NULL, NULL, NULL);
INSERT INTO `spec_value` VALUES (7, '魅焰红', 1, NULL, NULL, NULL, NULL);
INSERT INTO `spec_value` VALUES (8, '冰岛白', 1, NULL, NULL, NULL, NULL);
INSERT INTO `spec_value` VALUES (9, '全网通(4GB+64GB)', 2, NULL, NULL, NULL, NULL);
INSERT INTO `spec_value` VALUES (10, '全网通(6GB+64GB)', 2, NULL, NULL, NULL, NULL);
INSERT INTO `spec_value` VALUES (11, '全网通(6GB+128GB)', 2, NULL, NULL, NULL, NULL);
INSERT INTO `spec_value` VALUES (12, '全网通(8GB+128GB)', 2, NULL, NULL, NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for tag
-- ----------------------------
DROP TABLE IF EXISTS `tag`;
CREATE TABLE `tag` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '中文限制6个，英文限制12个，由逻辑层控制',
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `highlight` tinyint(4) unsigned DEFAULT '0',
  `type` tinyint(3) unsigned DEFAULT '1',
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  `delete_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Records of tag
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for theme
-- ----------------------------
DROP TABLE IF EXISTS `theme`;
CREATE TABLE `theme` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `tpl_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `entrance_img` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `extend` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `internal_top_img` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `title_img` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `online` tinyint(3) unsigned DEFAULT '1',
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  `delete_time` int(11) DEFAULT NULL,
  `topic_img_id` int(11) DEFAULT NULL COMMENT '关联image表id',
  `head_img_id` int(11) DEFAULT NULL COMMENT '关联image表id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Records of theme
-- ----------------------------
BEGIN;
INSERT INTO `theme` VALUES (1, '居家好物', '居家好物', '居家好物', '常规列表', '', NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for theme_product
-- ----------------------------
DROP TABLE IF EXISTS `theme_product`;
CREATE TABLE `theme_product` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `theme_id` int(10) unsigned NOT NULL COMMENT '主题外键',
  `product_id` int(10) unsigned NOT NULL COMMENT '商品外键',
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  `delete_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='主题所包含的商品';

-- ----------------------------
-- Records of theme_product
-- ----------------------------
BEGIN;
INSERT INTO `theme_product` VALUES (1, 1, 15, NULL, NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for third_app
-- ----------------------------
DROP TABLE IF EXISTS `third_app`;
CREATE TABLE `third_app` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `app_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `app_id` varchar(64) NOT NULL COMMENT '应用app_id',
  `app_secret` varchar(64) NOT NULL COMMENT '应用secret',
  `app_description` varchar(100) DEFAULT NULL COMMENT '应用程序描述',
  `scope` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '应用权限',
  `scope_description` varchar(100) DEFAULT NULL COMMENT '权限描述',
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  `delete_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='访问API的各应用账号密码表';

-- ----------------------------
-- Records of third_app
-- ----------------------------
BEGIN;
INSERT INTO `third_app` VALUES (1, 'web后台', 'star', '777', NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `third_app` VALUES (2, 'android', 'android', '778', NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `third_app` VALUES (3, 'ios', 'ios', '779', NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `third_app` VALUES (4, 'miniapp', 'miniapp', '780', NULL, NULL, NULL, NULL, NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `openid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `nickname` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `unify_uid` int(10) DEFAULT NULL,
  `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `mobile` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `wx_profile` json DEFAULT NULL,
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  `delete_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uni_openid` (`openid`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Records of user
-- ----------------------------
BEGIN;
INSERT INTO `user` VALUES (1, 'oY_2u4lqsrliv72cX9P0gCVrjvbk', NULL, NULL, NULL, NULL, NULL, NULL, 1586046263, 1586046263, NULL);
COMMIT;

-- ----------------------------
-- Table structure for user_address
-- ----------------------------
DROP TABLE IF EXISTS `user_address`;
CREATE TABLE `user_address` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(30) NOT NULL COMMENT '收获人姓名',
  `mobile` varchar(20) NOT NULL COMMENT '手机号',
  `province` varchar(20) DEFAULT NULL COMMENT '省',
  `city` varchar(20) DEFAULT NULL COMMENT '市',
  `country` varchar(20) DEFAULT NULL COMMENT '区',
  `detail` varchar(100) DEFAULT NULL COMMENT '详细地址',
  `user_id` int(11) NOT NULL COMMENT '外键',
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  `delete_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of user_address
-- ----------------------------
BEGIN;
INSERT INTO `user_address` VALUES (1, '李刚', '18511013818', '山东省', '济南市', '历城区', '东西条街道382号', 1, 1584516229, 1584516229, NULL);
INSERT INTO `user_address` VALUES (2, '张大川', '18511013819', '海南省', '海口市', '美兰区', '龙舌路23号', 1, 1584516229, 1584516229, NULL);
INSERT INTO `user_address` VALUES (3, '安车', '18511013820', '海南省', '海口市', '美兰区', '人民大道58号', 1, 1584517652, 1584517652, NULL);
COMMIT;

-- ----------------------------
-- Table structure for user_coupon
-- ----------------------------
DROP TABLE IF EXISTS `user_coupon`;
CREATE TABLE `user_coupon` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned NOT NULL,
  `coupon_id` int(10) unsigned NOT NULL,
  `status` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '1:未使用，2：已使用， 3：已过期',
  `order_id` int(10) unsigned DEFAULT NULL,
  `create_time` int(11) DEFAULT NULL,
  `update_time` int(11) DEFAULT NULL,
  `delete_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uni_user_coupon` (`user_id`,`coupon_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Records of user_coupon
-- ----------------------------
BEGIN;
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
